(function () {
    var one = document.getElementById("one");
    var tow = document.getElementById("tow");
    var san = document.getElementById("san");

    var str = "";
    for (var i = 0; i < province.length; i++) {
        str += '<option value=' + province[i][0] + '>' + province[i][1] + '</option>';
    }
    one.innerHTML = str;

    console.log(one.value)
    var str1 = "";
    var city1 = city[one.value];
    for (var i = 0; i < city1.length; i++) {
        str1 += '<option value=' + city1[i][0] + '>' + city1[i][1] + '</option>';
    }
    tow.innerHTML = str1;

    var str2 = "";
    console.log(tow.value)
    var school = allschool[tow.value]
    for (var i = 0; i < school.length; i++) {
        str2 += '<option value=' + school[i][1] + '>' + school[i][2] + '</option>';
    }
    san.innerHTML = str2;


})()
one.onchange = function () {

    var str1 = "";
    var city1 = city[one.value];
    for (var i = 0; i < city1.length; i++) {
        str1 += '<option value=' + city1[i][0] + '>' + city1[i][1] + '</option>';
    }
    tow.innerHTML = str1;

    var str2 = "";
    console.log(tow.value)
    var school = allschool[tow.value]
    for (var i = 0; i < school.length; i++) {
        str2 += '<option value=' + school[i][1] + '>' + school[i][2] + '</option>';
    }
    san.innerHTML = str2;
}

tow.onchange = function () {

    var str2 = "";
    console.log(tow.value)
    var school = allschool[tow.value]
    for (var i = 0; i < school.length; i++) {
        str2 += '<option value=' + school[i][1] + '>' + school[i][2] + '</option>';
    }
    san.innerHTML = str2;

}